<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Home Page</title>
</head>
<body>
	<h1>Welcome Home Page</h1>
	<form action="book_add" method="post">
		title: <input name="book.title"><br> author: <input
			name="book.author"><br> publisher: <input
			name="book.publisher"><br> time: <input name="book.time"><br>
		<input type="submit" value="ADD">
	</form>
	<br>
	<a href="user_logout">LOGOUT</a>
	<hr>
		<table border="1">
			<tr>
				<th>ID</th>
				<th>TITLE</th>
				<th>AUTHOR</th>
				<th>PUBLISHER</th>
				<th>TIME</th>
				<th colspan="2">OPERATION</th>
			</tr>
			<c:forEach var="book" items="${sessionScope.books }" varStatus="vs">
			<tr>
				<td>${vs.count }</td>
				<td>${book.title }</td>
				<td>${book.author }</td>
				<td>${book.publisher }</td>
				<td>${book.time }</td>
				<td><a href="book_modify?book.id=${book.id }">EDIT</a></td>
				<td><a href="book_remove?book.id=${book.id }" onclick="return del()">DELETE</a></td>
			</tr>
			</c:forEach>
		</table>
</body>
</html>